
R3F_FNCT_ObjectSelect = {
	private ["_temp","_object"];
	_temp = time + 10;
	_object = objNull;
	scopeName "selection";
	while {time < _temp} do {
		_object = cursorTarget;
		if !(isNull _object) then {
			hint format [Localize "STR_R3F_FNCT_OBJECTSELECT",_object];
			breakTo "selection";
		};
		sleep 0.5;
	};
	_object;
};
R3F_FNCT_ObjPosCam = {
	private ["_object","_damage"];
	_object = _this select 0;
	sleep 10;
	_damage = getDammage _object;
	if (!isNil "BIS_DEBUG_CAM") then {
		while {!isNil "BIS_DEBUG_CAM"} do {
			_object setPosATL (getPosATL BIS_DEBUG_CAM);
			_object setDir (getDir BIS_DEBUG_CAM);
			_object setDamage 0;
			sleep 3;
		};
		_object setDamage _damage;
	};
};
R3F_FNCT_ObjectDir = {
	private ["_object","_direction"];
	_object = _this select 0;
	if (typeName _object == "OBJECT") then {
		_direction = _this select 1;
		_object setDir _direction;
		_object setPos (getPos _object);
	};
};
R3F_FNCT_ObjectHeight = {
	private ["_object","_height"];
	_object = _this select 0;
	if (typeName _object == "OBJECT") then {
		_height = _this select 1;
		_object setPosATL [(getPosATL _object) select 0,(getPosATL _object) select 1,((getPosATL _object) select 2) + _height];
	};
};
R3F_FNCT_ObjectDelete = {
	private "_object";
	if (count _this > 0) then {
		_object = _this select 0;
	} else {
		_object = [] call R3F_FNCT_ObjectSelect;
	};
	if (typeName _object == "OBJECT") then {
		hint format [Localize "STR_R3F_FNCT_OBJECTDELETE1",_object];
		deleteVehicle _object;
	} else {
		hint (Localize "STR_R3F_FNCT_OBJECTDELETE2");
	};
};
R3F_FNCT_ObjectAttach = {
	private "_object";
	if (count _this > 0) then {
		_object = _this select 0;
	} else {
		_object = [] call R3F_FNCT_ObjectSelect;
	};
	if (typeName _object == "OBJECT") then {
		hint format [Localize "STR_R3F_FNCT_OBJECTATTACH1",_object];
		_object attachTo [player,[0,(((boundingBox _object select 1 select 1) max (-(boundingBox _object select 0 select 1))) max ((boundingBox _object select 1 select 0) max (-(boundingBox _object select 0 select 0)))) + 1,1]];
		player addAction [(Localize "STR_R3F_FNCT_OBJECTATTACH2") call R3F_FNCT_Blue,"R3F_ACV\Scripts\CREATE_object_detach.sqf",[_object],1,false];
	};
};
